<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>{{ base_info.name }}的简历</title>
    <style>
        @page {
            size: A4;
            margin: 2cm;
        }

        body {
            font-family: "Microsoft YaHei", sans-serif;
            line-height: 1.6;
            color: #333;
        }

        .resume-header {
            text-align: center;
            margin-bottom: 30px;
        }

        .resume-title {
            font-size: 24px;
            color: #1e3c72;
            margin-bottom: 20px;
        }

        .section {
            margin-bottom: 25px;
        }

        .section-title {
            font-size: 18px;
            color: #1e3c72;
            border-bottom: 2px solid #1e3c72;
            padding-bottom: 5px;
            margin-bottom: 15px;
        }

        .info-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            margin-bottom: 15px;
        }

        .info-item {
            margin-bottom: 8px;
        }

        .info-label {
            font-weight: bold;
            color: #2a5298;
        }

        .description {
            margin-top: 10px;
            text-align: justify;
        }

        .experience-item {
            margin-bottom: 20px;
            padding: 10px;
            background: #f8f9fa;
        }
    </style>
</head>
<body>
    <div class="resume-header">
        <h1 class="resume-title">个人简历</h1>
    </div>

    <!-- 基本信息 -->
    {% if base_info %}
    <div class="section">
        <h2 class="section-title">基本信息</h2>
        <div class="info-grid">
            <div class="info-item">
                <span class="info-label">姓名：</span>
                <span>{{ base_info.name }}</span>
            </div>
            <div class="info-item">
                <span class="info-label">性别：</span>
                <span>{{ base_info.gender }}</span>
            </div>
            <div class="info-item">
                <span class="info-label">出生日期：</span>
                <span>{{ base_info.birthday }}</span>
            </div>
            <div class="info-item">
                <span class="info-label">联系电话：</span>
                <span>{{ base_info.phone }}</span>
            </div>
            <div class="info-item">
                <span class="info-label">电子邮箱：</span>
                <span>{{ base_info.email }}</span>
            </div>
            <div class="info-item">
                <span class="info-label">所在地区：</span>
                <span>{{ base_info.location }}</span>
            </div>
        </div>
        {% if base_info.personal_description %}
        <div class="description">
            <span class="info-label">个人描述：</span>
            <p>{{ base_info.personal_description }}</p>
        </div>
        {% endif %}
    </div>
    {% endif %}

    <!-- 教育经历 -->
    {% if education %}
    <div class="section">
        <h2 class="section-title">教育经历</h2>
        <div class="experience-item">
            <div class="info-grid">
                <div class="info-item">
                    <span class="info-label">学校：</span>
                    <span>{{ education.school }}</span>
                </div>
                <div class="info-item">
                    <span class="info-label">专业：</span>
                    <span>{{ education.major }}</span>
                </div>
                <div class="info-item">
                    <span class="info-label">学历/学位：</span>
                    <span>{{ education.degree }}</span>
                </div>
                <div class="info-item">
                    <span class="info-label">在校时间：</span>
                    <span>{{ education.start_date }} 至 {{ education.end_date }}</span>
                </div>
            </div>
            {% if education.description %}
            <div class="description">
                <span class="info-label">在校表现：</span>
                <p>{{ education.description }}</p>
            </div>
            {% endif %}
        </div>
    </div>
    {% endif %}

    <!-- 工作经验 -->
    {% if work %}
    <div class="section">
        <h2 class="section-title">工作经验</h2>
        <div class="experience-item">
            <div class="info-grid">
                <div class="info-item">
                    <span class="info-label">公司名称：</span>
                    <span>{{ work.company_name }}</span>
                </div>
                <div class="info-item">
                    <span class="info-label">职位：</span>
                    <span>{{ work.position }}</span>
                </div>
                <div class="info-item">
                    <span class="info-label">部门：</span>
                    <span>{{ work.department }}</span>
                </div>
                <div class="info-item">
                    <span class="info-label">工作时间：</span>
                    <span>{{ work.start_date }} 至 {{ work.end_date }}</span>
                </div>
            </div>
            {% if work.responsibilities %}
            <div class="description">
                <span class="info-label">工作职责：</span>
                <p>{{ work.responsibilities }}</p>
            </div>
            {% endif %}
        </div>
    </div>
    {% endif %}

    <!-- 专业技能 -->
    {% if skill %}
    <div class="section">
        <h2 class="section-title">专业技能</h2>
        <div class="experience-item">
            <div class="info-grid">
                <div class="info-item">
                    <span class="info-label">技能名称：</span>
                    <span>{{ skill.name }}</span>
                </div>
                <div class="info-item">
                    <span class="info-label">熟练程度：</span>
                    <span>{{ skill.level }}</span>
                </div>
            </div>
            {% if skill.description %}
            <div class="description">
                <span class="info-label">技能描述：</span>
                <p>{{ skill.description }}</p>
            </div>
            {% endif %}
        </div>
    </div>
    {% endif %}

    <!-- 获奖情况 -->
    {% if award %}
    <div class="section">
        <h2 class="section-title">获奖情况</h2>
        <div class="experience-item">
            <div class="info-grid">
                <div class="info-item">
                    <span class="info-label">奖项名称：</span>
                    <span>{{ award.award_name }}</span>
                </div>
                <div class="info-item">
                    <span class="info-label">获奖级别：</span>
                    <span>{{ award.award_level }}</span>
                </div>
                <div class="info-item">
                    <span class="info-label">获奖时间：</span>
                    <span>{{ award.award_date }}</span>
                </div>
                <div class="info-item">
                    <span class="info-label">颁发机构：</span>
                    <span>{{ award.award_organization }}</span>
                </div>
            </div>
            {% if award.award_description %}
            <div class="description">
                <span class="info-label">奖项描述：</span>
                <p>{{ award.award_description }}</p>
            </div>
            {% endif %}
        </div>
    </div>
    {% endif %}
</body>
</html>